<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/layui/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">
    <div class="layui-form-item">
        <label class="layui-form-label">标题:</label>
        <div class="layui-input-inline" style="width: 50%;">
            <input type="text" disabled value="${upInformation.title}" class="layui-input">
        </div>
        <label class="layui-form-label">时间:</label>
        <div class="layui-input-inline">
            <input type="text" disabled value="${upInformation.createTime}" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">前言:</label>
        <div class="layui-input-block">
            <textarea id="preface" disabled class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label ">内容:</label>
        <div class="layui-input-block">
            <textarea name="content"  id="content" disabled style="display: none;" class="layui-textarea"></textarea>
        </div>
    </div>
</div>
<script src="${pageContext.request.contextPath}/layui/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/layui/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
    layui.use(['table', 'form','layedit', 'tableSelect'], function () {
        var form = layui.form,
            layer = layui.layer,
            tableSelect = layui.tableSelect,
            layedit=layui.layedit,
            $ = layui.$;

        var index1 = layedit.build('content', {
            tool: ['strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right'],
            height: 280
        });
        // layedit.getText(index1);//获得纯文本内容
        // layedit.getContent(index1);//获得所有内容，包括样式
        // layedit.setContent(index1, txt);//将内容写入文本域

        $("#preface").val("${upInformation.preface}");
        layedit.setContent(index1,'${upInformation.content}');




    });
</script>
</body>
</html>